<?php

use Swoole\WebSocket\Frame;
use Swoole\WebSocket\Server;

$server = new Server('127.0.0.1', 9501);
$server->on('message', function (Server $server, Frame $frame) {
    $pingFrame = new Frame;
    $aa ??= 2;

    $pingFrame->opcode = WEBSOCKET_OPCODE_PING;
    print_r($pingFrame);
    $server->push($frame->fd, $pingFrame);
});
$server->start();

public function FunctionName($value='')
{
	// code...
}